package dk.twu.analyzer.util;

/**
 * Created by Tao Wu on 1/3/2015.
 */
public class DateTimeCleaner {
    public static String clean(String dateTimeText) {
        String monthStr = dateTimeText.substring(2, 5);
        String correctMonthStr = "";
        switch (monthStr) {
            case "jan":
                correctMonthStr = "Jan";
                break;
            case "fen":
                correctMonthStr = "Feb";
                break;
            case "dec":
                correctMonthStr = "Dec";
                break;
        }
        if (correctMonthStr != "") {
            String cleaned = dateTimeText.replace(monthStr, correctMonthStr);
            return cleaned;
        } else {
            return dateTimeText;
        }
    }
}
